package nancal.mp.client.node


import nbcp.base.comm.JsonResult
import nbcp.http.HttpClient
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody

@HttpClient("nodejs")
interface NodeJsClient {
    @PostMapping("/run-api")
    fun runApi(
        storyId: String,
        apiIndex: Int,
    ): JsonResult


    @PostMapping("/run-story")
    fun runStory(
        storyId: String
    ): JsonResult


    @PostMapping("/exec-curl", produces = arrayOf("text/plain"))
    fun execCurl(@RequestBody curl: String): String

}
